package com.eep.order;

import java.util.ArrayList;
import java.util.List;

public class OrderDetailed extends OrderSummary {

    protected double cost;
    protected String orderTable;
    protected List<OrderLineItem> orderLineItems;

    public OrderDetailed() {
        orderLineItems = new ArrayList<OrderLineItem>();
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public String getOrderTable() {
       
        return orderTable;
    }

    public void setOrderTable(String orderTable) {
        this.orderTable = orderTable;
    }

    public int getOrderLineItemCount() {
        return orderLineItems.size();
    }

    public OrderLineItem getOrderLineItem(int index) {
        OrderLineItem result = null;
        if (index > -1 && index < orderLineItems.size()) {
            result = orderLineItems.get(index);
        }
        return result;
    }

    public void addOrderLineItem(OrderLineItem item) {
        orderLineItems.add(item);
    }
    

}
